import Storage from 'js-storage';

const storage = Storage.localStorage;
const TokenKey = 'Admin-Token';
const OSSTokenKey = 'Ali-OSS-STS';
const BaseApi = 'BaseApi';
const UserInfo = 'User-Info';

export function getToken() {
  return storage.get(TokenKey);
}

export function setToken(token) {
  return storage.set(TokenKey, token);
}

export function removeToken() {
  return storage.remove(TokenKey);
}

export function getOSSToken() {
  return storage.get(OSSTokenKey);
}

export function setOSSToken(token) {
  return storage.set(OSSTokenKey, token)
}

export function removeOSSToken() {
  return storage.remove(OSSTokenKey)
}

export function getUserInfo() {
  return storage.get(UserInfo);
}

export function setUserInfo(data) {
  return storage.set(UserInfo, data);
}

export function removeUserInfo(){
  return storage.remove(UserInfo)
}